<template>
  <div>
      <van-field label="请输入用户名" v-model="form.username"/>
      <van-field label="请输入密码" v-model="form.password" type="password"/>
      <van-button @click="add">登录</van-button>
  </div>
</template>

<script>
export default {
    data(){
        return{
            form:{}
        }
    },
    methods:{
        add(){
            this.axios.post('authorM',this.form).then(res=>{
                alert(res.data.mes)
                this.$router.push({path:'/books'})
            })
        }
    },
    mounted(){}
}
</script>

<style>

</style>